package com.wocai.jrt.orgadmin.employee.service.impl;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import com.wocai.jrt.orgadmin.employee.dao.EmployeeCommissionHistoryDao;
import com.wocai.jrt.orgadmin.employee.model.EmployeeCommissionHistory;
import com.wocai.jrt.orgadmin.employee.model.EmployeeCommissionHistoryBean;
import com.wocai.jrt.orgadmin.employee.service.spi.EmployeeCommissionHistoryService;
import com.wocai.jrt.orgadmin.pay.bean.CommissionPayEmpResBean;
import com.wocai.jrt.orgadmin.pay.bean.CommissionPayReqBean;
import com.wocai.jrt.orgadmin.pay.bean.CommissionPayResBean;
import com.wocai.jrt.orgadmin.pay.bean.CommissionPayTotalReqBean;
import com.wocai.jrt.orgadmin.pay.bean.CommissionPayTotalResBean;
import com.wocai.jrt.orgadmin.pay.bean.SettleAllReqBean;
import com.vteba.service.generic.impl.MyBatisServiceImpl;
import com.vteba.tx.jdbc.mybatis.spi.BaseDao;

/**
 * 佣金结算相关的service业务实现。
 * @author yinlei
 * @date 2015-8-25 19:35:32
 */
@Named
public class EmployeeCommissionHistoryServiceImpl extends MyBatisServiceImpl<EmployeeCommissionHistory, EmployeeCommissionHistoryBean, String> implements EmployeeCommissionHistoryService {
	// 添加了方法后，记得改为private
	protected EmployeeCommissionHistoryDao employeeCommissionHistoryDao;
	
	@Override
	@Inject
	public void setBaseDao(BaseDao<EmployeeCommissionHistory, EmployeeCommissionHistoryBean, String> employeeCommissionHistoryDao) {
		this.baseDao = employeeCommissionHistoryDao;
		this.employeeCommissionHistoryDao = (EmployeeCommissionHistoryDao) employeeCommissionHistoryDao;
	}

	@Override
	public List<CommissionPayResBean> fetchCommissionPay(CommissionPayReqBean commissionPayReqBean) {
		return employeeCommissionHistoryDao.fetchCommissionPay(commissionPayReqBean);
	}

	@Override
	public int fetchCount(CommissionPayReqBean commissionPayReqBean) {
		return employeeCommissionHistoryDao.fetchCount(commissionPayReqBean);
	}

	@Override
	public List<CommissionPayTotalResBean> fetchCommissionTotalPay(
			CommissionPayTotalReqBean commissionPayTotalReqBean) {
		return employeeCommissionHistoryDao.fetchCommissionTotalPay(commissionPayTotalReqBean);
	}

	@Override
	public int fetchTotalCount(CommissionPayTotalReqBean commissionPayTotalReqBean) {
		return employeeCommissionHistoryDao.fetchTotalCount(commissionPayTotalReqBean);
	}

	@Override
	public List<CommissionPayEmpResBean> fetchCommissionEmpPay(
			CommissionPayReqBean commissionPayReqBean) {
		return employeeCommissionHistoryDao.fetchCommissionEmpPay(commissionPayReqBean);
	}

	@Override
	public int fetchEmpCount(CommissionPayReqBean commissionPayReqBean) {
		return employeeCommissionHistoryDao.fetchEmpCount(commissionPayReqBean);
	}

	@Override
	public Integer settleAll(SettleAllReqBean settleAllReqBean) {
		return employeeCommissionHistoryDao.settleAll(settleAllReqBean);
	}
}
